home *** CD-ROM | disk | FTP | other *** search
/ Internet Surfer: Getting Started / Internet Surfer - Getting Started (Wayzata Technology)(7231)(1995).bin / pc / textfile / mac_faqs / tcl_faq / part1 next >
Internet Message Format  |  1995-01-30  |  14KB

  1. Xref: bloom-picayune.mit.edu comp.lang.tcl:2075 news.answers:4539
  2. Newsgroups: comp.lang.tcl,news.answers
  3. Path: bloom-picayune.mit.edu!enterpoop.mit.edu!spool.mu.edu!caen!malgudi.oar.net!chemabs!lvirden
  4. From: lvirden@cas.org (Larry W. Virden)
  5. Subject: comp.lang.tcl Frequently Asked Questions (1/3)
  6.      (Last updated: November 8, 1992)
  7. Message-ID: <tcl.p1_724079551@cas.org>
  8. Followup-To: comp.lang.tcl
  9. Summary: A regular posting of the comp.lang.tcl Frequently Asked Questions 
  10.     (FAQ) and their answers.  This is the first of three parts.
  11. Originator: lwv26@lwv26aws
  12. Keywords: tcl, extended tcl, tk, expect
  13. Sender: lvirden@cas.org
  14. Supersedes: <tcl.p1_721227419@cas.org>
  15. Reply-To: lvirden@cas.org (Larry W. Virden)
  16. Organization: Chemical Abstracts Service
  17. Date: Fri, 11 Dec 1992 13:12:40 GMT
  18. Approved: news-answers-request@MIT.Edu
  19. Expires: Sun, 24 Jan 1993 13:12:31 GMT
  20. Lines: 308
  21.  
  22. Archive-name: tcl-faq/part1
  23. Version: 2.5
  24. Last-modified: November 8, 1992
  25.  
  26.  
  27. Index of questions:
  28.  
  29. 0. Origin of the comp.lang.tcl FAQ information.
  30. 1. What is Tcl?     Tk?  Extended Tcl?  How does Tcl compare against language 
  31.     XXX?
  32. 2. Do these packages run on my machine?
  33.     a. Unix
  34.     b. MacOS
  35.     c. MS-DOS
  36.     d. VMS
  37. 3. Other than C, What languages can talk to tcl/tk?
  38.     a. Shell
  39.     b. C++
  40.         c. Modula-3
  41. 4. Is there a bibliography of material relating to these programs?
  42. 5. Where do I report problems, bugs, or enhancements - or -
  43.     What is comp.lang.tcl?
  44. 6. Where can I find the FAQ and who do I contact for more information 
  45.     about it?
  46.     
  47. End of FAQ Index
  48.  
  49. ------------------------------
  50. Subject: -0- Origin of the comp.lang.tcl FAQ information.
  51.  
  52. The information in this set of FAQs comes from 3 sources.  The primary
  53. source of information is the group itself - I spent (much too much) time
  54. each month culling through what I feel are some of the best answers,
  55. gathering up new information on ports, etc. and adding it here.  I also
  56. gather together new application information and add it as best I can.
  57. The next most predominant source of information comes from the authors
  58. of the various software packages.  Finally, a small amount comes from
  59. my personal experiences.
  60.  
  61. I am always on the search for folk to assist in the maintenance of these
  62. FAQs.  In fact, if you feel that you would like to coordinate this 
  63. effort, PLEASE let me know!
  64.  
  65. Subject: -1- What is Tcl?  Tk?  Extended Tcl?  How does Tcl compare
  66.         against language XXX?
  67.  
  68.     Tcl (version 6.4) stands for ``tool command language'' and is
  69. pronounced ``tickle.'' It is actually two things: a language and a
  70. library.  First, Tcl is a simple textual language, intended primarily
  71. for issuing commands to interactive programs such as text editors,
  72. debuggers, illustrators, and shells.  It has a simple syntax and is
  73. also programmable, so Tcl users can write command procedures to provide
  74. more powerful commands than those in the built-in set.
  75.  
  76.     Second, Tcl is a library package that can be embedded in
  77. application programs.  The Tcl library consists of a parser for the Tcl
  78. language, routines to implement the Tcl built-in commands, and
  79. procedures that allow each application to extend Tcl with additional
  80. commands specific to that application.  The application program
  81. generates Tcl commands and passes them to the Tcl parser for
  82. execution.  Commands may be generated by reading characters from an
  83. input source, or by associating command strings with elements of the
  84. application's user interface, such as menu entries, buttons, or
  85. keystrokes.  When the Tcl library receives commands it parses them into
  86. component fields and executes built-in commands directly.  For commands
  87. implemented by the application, Tcl calls back to the application to
  88. execute the commands.  In many cases commands will invoke recursive
  89. invocations of the Tcl interpreter by passing in additional strings to
  90. execute (procedures, looping commands, and conditional commands all
  91. work in this way).
  92.  
  93.     An application program gains three advantages by using Tcl for
  94. its command language.  First, Tcl provides a standard syntax:  once
  95. users know Tcl, they will be able to issue commands easily to any
  96. Tcl-based application.  Second, Tcl provides programmability.  All a
  97. Tcl application needs to do is to implement a few application-specific
  98. low-level commands.  Tcl provides many utility commands plus a general
  99. programming interface for building up complex command procedures.  By
  100. using Tcl, applications need not re-implement these features.  Third,
  101. extensions to Tcl, such as the Tk toolkit, provide mechanisms for
  102. communicating between applications by sending Tcl commands back and
  103. forth.  The common Tcl language framework makes it easier for
  104. applications to communicate with one another.
  105.  
  106.     Tk 2.3 - an extension to Tcl which provides the programmer with
  107. an interface to the X11 windowing system.  Note that many users will
  108. encounter Tk via the ``wish'' command.  Wish is a simple windowing
  109. shell which permits the user to write Tcl applications in a prototyping
  110. environment.
  111.  
  112.     Extended Tcl (tclX) 6.4c-p1 - This extended set of commands are
  113. provided by NeoSoft, and provide additional Unix system interfaces to
  114. the Tcl programmer.  Many users will encounter Tcl via the ``tcl''
  115. command - an interactive Tcl command interpreter.
  116.  
  117.  ?? I do not have any info written yet for the language comparisons ??
  118.  
  119. ------------------------------
  120. Subject: -2- Do these packages run on my machine?
  121.  
  122. a. Unix
  123.  
  124.     Tcl runs on Suns and SunOS, DECstations running Ultrix, Dec
  125. VAXen running Ultrix or BSD, 386s running SCO Unix, Xenix, Bell-Tech,
  126. Silicon Graphics running IRIX, HPs running HP-UX, Sequent Symmetry
  127. running Dynix.  See the porting section below for info on porting the
  128. code to VMS as well.
  129.  
  130.     Tk (being based on Tcl) requires X11R4 or better as the only additional
  131. software requirement.
  132.  
  133. b. MacOS
  134.  
  135.     Contact W. Ross Brown <ross@bnr.ca> for the current status of
  136. the Tcl MacOS port.  Ross has a mailing list for discussion on that
  137. topic.  Also, "Eric W. Sink" <e-sink@uiuc.edu> is working on a port
  138. which includes some tclX extensions as well as some Mac-specific extensions.
  139.  
  140. c. MS-DOS
  141.  
  142.     Two ports are available.  One unsupported port of Tcl and Extended 
  143. Tcl 6.0, done by "Karl Lehenbauer" <Karl@NeoSoft.com>, is available on 
  144. barkley.berkeley.edu.
  145.  
  146.     The other port of TCL V6.2 was done by 
  147. "John Martin" <johnm@cajal.uoregon.edu> and is available via FTP from
  148. cajal.uoregon.edu.
  149.  
  150. d. VMS
  151.  
  152.     A port of TCL 6.2 and Tk 1.4 to VMS was done by Angel Li
  153. <angel@flipper.rsmas.miami.edu>.  The files are
  154. mango.rsmas.miami.edu:pub/tcl-vms.bck.Z and
  155. mango.rsmas.miami.edu:pub/tk-vms.bck.Z
  156.  
  157. and are compressed with the Unix compress command.  The files are 
  158. VMS BACKUP files.
  159.  
  160.  
  161. ------------------------------
  162. Subject: -3- Other than C, What languages can talk to tcl/tk?
  163.  
  164. a. Shell
  165.  
  166.     There are two standard interfaces which are shell-like.  The
  167. first is wish, which is a windowing shell like interface that is a part
  168. of the Tk package.  The second is tcl, a line command interpreter that
  169. is part of the Extended TCL package.
  170.  
  171. b. C++
  172.  
  173.     Check out tcl++.h in Extended Tcl.  Based on an original
  174. implementation by Parag Patel, it defines a Tcl interpreter class by
  175. which Tcl interpreters can be created as objects under C++.
  176.  
  177.     Mark Diekhans and Karl Lehenbauer have used this, in
  178. combination with the handle facility in Extended Tcl, to build Tcl
  179. commands around C++ classes.
  180.  
  181.     The Tcl handle facility provides a way to manage table entries
  182. that can be referenced by a textual handle from Tcl code.  This is
  183. provided for applications that need to create data structures in one
  184. command, return a reference (i.e. pointer) to that particular data
  185. structure and then access that data structure in other commands.  An
  186. example application is file handles.
  187.  
  188.     A handle table was built containing pointers to the instances
  189. of a class that were to be accessed from Tcl, say a class `foo_cl', and
  190. then a "new" command defined that created an instance of that class and
  191. returned a Tcl handle to it.  The handle could then passed among Tcl
  192. commands that accessed each member function.  The handle is in effect
  193. an explicit `this' pointer.
  194.  
  195.     For example:
  196.  
  197.      set obj [foo_cl::new]
  198.      foo_cl::baz $obj "Hello world"
  199.      foo_cl::delete $obj
  200.  
  201. It's not totally object-oriented, but it's still very usable.
  202.  
  203. c. Modula-3
  204.  
  205. Norman Ramsey <elan.uucp!nr> says:
  206.  
  207.     A long time back, Eric Muller posted a Modula-3 interface to
  208. the C TCL library.  I wrote down a Modula-3/TCL interface that used
  209. Modula-3 types rather than C types, and that used objects to build
  210. closures for commands.  I wrote part of the implementation but never
  211. finished it.  I have mailed copies to carroll@udel.edu, who asked the
  212. question, and I will post them if there seems to be general interest.
  213.  
  214. ------------------------------
  215. Subject: -4- Is there a bibliography of material relating to these 
  216.         programs?
  217.  
  218. A. With the Tcl distribution there is a Postscript version of a Usenix
  219. paper introducing Tcl.  With the Tk distribution, there is a Postscript
  220. version of a Usenix paper introducing Tk.
  221.  
  222.  
  223. Ousterhout, J.K., (1990) ``TCL: An Embeddable Command Language'', in
  224. the Proceedings of the 1990 Winter USENIX Conference, pp 133-146.
  225.  
  226. Ousterhout, J.K., (1990) ``An X11 Toolkit Based on the TCL Language'',
  227. in the Proceedings of the 1991 Winter USENIX Conference, pp 105-115.
  228.  
  229. Postscript file for introductory papers on Tcl and Tk are available in
  230. the public FTP area on sprite.berkeley.edu (Internet address
  231. 128.32.150.27).  To retrieve them, ftp to sprite (login "anonymous",
  232. password "guest") and type the following commands:
  233.  
  234. get tclUsenix90.ps
  235. get tkUsenix91.ps
  236. get tkF10.ps
  237.  
  238. (The last of these files is the contents of Figure 10 of the Tk paper)
  239.  
  240. If you have trouble retrieving the papers via FTP or printing them,
  241. send bmiller@sprite.berkeley.edu your U.S. Mail address and he'll mail
  242. you paper copies.
  243.  
  244. B. With the Expect distribution, there are several Postscript documents
  245. available which have been published.
  246.  
  247. "Curing Those Uncontrollable Fits of Interaction", Proceedings of the
  248. Summer 1990 USENIX Conference, Anaheim, CA, June 11-15, 1990.  (This
  249. paper is discussion of implementation, philosophy, and design.  It is
  250. pub/expect/seminal.ps.Z on ftp.cme.nist.gov.)
  251.  
  252. "Using expect to Automate System Administration Tasks", Proceedings of
  253. the 1990 USENIX Large Systems Administration Conference (LISA) IV,
  254. Colorado Springs, CO, October 17-19, 1990.  (This paper is discussion
  255. and examples, specifically aimed at system administrators.  It is
  256. pub/expect/sysadm.ps.Z on ftp.cme.nist.gov.)
  257.  
  258. "expect: Scripts for Controlling Interactive Programs", Computing
  259. Systems, Vol. 4, No. 2, University of California Press Journals, 1991.
  260. (A comprehensive paper of example scripts.  This paper is
  261. pub/expect/scripts.ps.Z on ftp.cme.nist.gov.)
  262.  
  263. C. A FrameMaker MIF file containing a Quick Reference guide to Tcl is
  264. available as barkley.berkeley.edu:/tcl/docs/QuickRef.tar.Z.  Thanks to
  265. "Jeff Tranter" <Jeff.Tranter@software.mitel.com> for contributing it.
  266.  
  267. D. PostScript versions of the man pages were provided by 
  268. "Adrian Ho" <adrianho@barkley.berkeley.edu>.  These are available on
  269. barkley.berkeley.edu:/tcl/docs/tcl6.3.manps.tar.Z
  270. barkley.berkeley.edu:/tcl/docs/tclX6.2b.manps.tar.Z
  271. barkley.berkeley.edu:/tcl/docs/tk2.1.manps.tar.Z
  272.  
  273. E. An early draft of a text book based on Tcl and Tk, written by
  274. John Ousterhout and to be published in 1993 by Addison-Wesley is available as
  275. sprite.berkeley.edu:tcl/book.p1.ps.Z .  It is about 130 pages in length.
  276. This is ONLY a draft.
  277.  
  278. F. A series of PostScript versions of slides used in a tutorial on 
  279. Tcl and Tk at the 1992 X Conference are available as 
  280. sprite.berkeley.edu:tcl/talk[1-5].ps and tkSquare.c.
  281.  
  282. Additional bibliographic references are still being sought.
  283.  
  284. ------------------------------
  285. Subject: -5- Where do I report problems, bugs, or enhancements - or -
  286.         What is comp.lang.tcl?
  287.  
  288.     There are two alternatives for reporting bugs and problems.
  289. The first is the USENET news group comp.lang.tcl, an unmoderated USENET
  290. newsgroup, created for the discussion of the Tcl programming language
  291. and tools that embed it, such as the Tk toolkit for the X window
  292. system, expect, and Extended Tcl.  Please note that postings of source
  293. code to comp.lang.tcl do not get archived to barkley.berkeley.edu - if
  294. you want your code to be available from the User Contributions archive
  295. you will need to make arrangements for someone to ftp it there.  See
  296. elsewhere in the FAQ for more details on the archive site.
  297.  
  298.     The second would be to report problems, suggestions, new
  299. ideas, etc. to the author.  Email to
  300.  
  301. ouster@allspice.berkeley.edu (John Ousterhout)
  302.  
  303. will get comments to the author of Tcl and Tk - for other programs, email
  304. addresses are available either elsewhere in this part or part 3.
  305.  
  306.     Note: for those USENET-deprived individuals who are thus unable
  307. to read comp.lang.tcl, a small echoing mailing list is available.
  308. Contact John Ousterhout (see above for email address) for details.
  309.  
  310. ------------------------------
  311. Subject: -6- Where can I find the FAQ and who do I contact for more 
  312.         information about it?
  313.  
  314.     I am going to attempt to keep a copy of this file up to date on
  315. barkley.berkeley.edu.  Also, I will be posting it on a regular basis to
  316. at least comp.lang.tcl and news.answers.
  317.  
  318.     If you have corrections, enhancements, modifications,
  319. clarifications, suggestions, ideas, new questions, new answers to
  320. questions which have never been asked, or something else that I have
  321. not covered above, contact me at lvirden@cas.org.
  322. -- 
  323. Larry W. Virden                 UUCP: osu-cis!chemabs!lvirden
  324. Same Mbox: BITNET: lvirden@cas  INET: lvirden@cas.org
  325. Personal: 674 Falls Place,   Reynoldsburg, OH 43068-1614
  326. -- 
  327. Larry W. Virden                 UUCP: osu-cis!chemabs!lvirden
  328. Same Mbox: BITNET: lvirden@cas  INET: lvirden@cas.org
  329. Personal: 674 Falls Place,   Reynoldsburg, OH 43068-1614
  330.